
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>服务器部分 · Aivin开发笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Aivin">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-local-video/video-js.min.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../webDev/web部分.html" />
    
    
    <link rel="prev" href="../native/相关代码.html" />
    

    
        <link rel="shortcut icon" href='../../assets/images/favicon.ico' type="image/x-icon">
    
    
        <link rel="bookmark" href='../../assets/images/favicon.ico' type="image/x-icon">
    
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    首页
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../doc/常用网站.html">
            
                <a href="../doc/常用网站.html">
            
                    
                    常用网站
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../常用软件/常用软件和框架.html">
            
                <a href="../常用软件/常用软件和框架.html">
            
                    
                    常用软件和框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../doc/开发规范.html">
            
                <a href="../doc/开发规范.html">
            
                    
                    开发规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../doc/开源软件.html">
            
                <a href="../doc/开源软件.html">
            
                    
                    开源软件和框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../doc/Android常用代码.html">
            
                <a href="../doc/Android常用代码.html">
            
                    
                    Android常用代码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../源码阅读/源码阅读配置.html">
            
                <a href="../源码阅读/源码阅读配置.html">
            
                    
                    源码阅读
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../源码阅读/其他框架源码.html">
            
                <a href="../源码阅读/其他框架源码.html">
            
                    
                    其他框架源码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../产品经理/产品经理.html">
            
                <a href="../产品经理/产品经理.html">
            
                    
                    产品经理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../设计模式/设计模式.html">
            
                <a href="../设计模式/设计模式.html">
            
                    
                    设计模式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../设计模式/设计模式.html">
            
                <a href="../设计模式/设计模式.html">
            
                    
                    设计模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../设计模式/模式详解.html">
            
                <a href="../设计模式/模式详解.html">
            
                    
                    模式详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../设计模式/mvc等.html">
            
                <a href="../设计模式/mvc等.html">
            
                    
                    mvc等
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../数据结构/常用数据结构.html">
            
                <a href="../数据结构/常用数据结构.html">
            
                    
                    基本算法
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../数据结构/常用数据结构.html">
            
                <a href="../数据结构/常用数据结构.html">
            
                    
                    常用数据结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../常用算法/算法术语.html">
            
                <a href="../常用算法/算法术语.html">
            
                    
                    算法术语
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../常用算法/排序算法.html">
            
                <a href="../常用算法/排序算法.html">
            
                    
                    排序算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" data-path="../常用算法/查找算法.html">
            
                <a href="../常用算法/查找算法.html">
            
                    
                    查找算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" data-path="../常用算法/大数相加.html">
            
                <a href="../常用算法/大数相加.html">
            
                    
                    大数相加
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.6" data-path="../常用算法/集合的所有子集.html">
            
                <a href="../常用算法/集合的所有子集.html">
            
                    
                    获得集合的所有子集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.7" data-path="../常用算法/扫描线种子填充算法.html">
            
                <a href="../常用算法/扫描线种子填充算法.html">
            
                    
                    扫描线种子填充算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.8" data-path="../常用算法/其他算法.html">
            
                <a href="../常用算法/其他算法.html">
            
                    
                    其他算法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../java基础/原码补码反码.html">
            
                <a href="../java基础/原码补码反码.html">
            
                    
                    Java部分
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../java基础/原码补码反码.html">
            
                <a href="../java基础/原码补码反码.html">
            
                    
                    原码补码反码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../java基础/java常用代码.html">
            
                <a href="../java基础/java常用代码.html">
            
                    
                    java常用代码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.3" data-path="../java基础/JVM详解.html">
            
                <a href="../java基础/JVM详解.html">
            
                    
                    JVM详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.4" data-path="../java基础/类加载机制.html">
            
                <a href="../java基础/类加载机制.html">
            
                    
                    类加载机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.5" data-path="../java基础/内存模型.html">
            
                <a href="../java基础/内存模型.html">
            
                    
                    内存模型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.6" data-path="../java基础/GC机制.html">
            
                <a href="../java基础/GC机制.html">
            
                    
                    GC机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.7" data-path="../java基础/对象内存布局.html">
            
                <a href="../java基础/对象内存布局.html">
            
                    
                    对象内存布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.8" data-path="../java基础/继承多态.html">
            
                <a href="../java基础/继承多态.html">
            
                    
                    继承和多态
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.9" data-path="../java基础/相等判断.html">
            
                <a href="../java基础/相等判断.html">
            
                    
                    相等判断
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.10" data-path="../java基础/Java容器类.html">
            
                <a href="../java基础/Java容器类.html">
            
                    
                    Java容器类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.11" data-path="../java基础/Java枚举.html">
            
                <a href="../java基础/Java枚举.html">
            
                    
                    Java枚举
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.12" data-path="../java基础/自定义异常.html">
            
                <a href="../java基础/自定义异常.html">
            
                    
                    自定义异常
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.13" data-path="../java基础/深度拷贝.html">
            
                <a href="../java基础/深度拷贝.html">
            
                    
                    深度拷贝
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.14" data-path="../java基础/泛型详解.html">
            
                <a href="../java基础/泛型详解.html">
            
                    
                    泛型详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.15" data-path="../java基础/线程详解.html">
            
                <a href="../java基础/线程详解.html">
            
                    
                    线程详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.16" data-path="../java基础/java注解.html">
            
                <a href="../java基础/java注解.html">
            
                    
                    注解详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.17" data-path="../java基础/数据解析.html">
            
                <a href="../java基础/数据解析.html">
            
                    
                    数据解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.18" data-path="../java基础/java8新特性.html">
            
                <a href="../java基础/java8新特性.html">
            
                    
                    Java8新特性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../android基础/android零散知识.html">
            
                <a href="../android基础/android零散知识.html">
            
                    
                    Android部分
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../android基础/基础控件使用.html">
            
                <a href="../android基础/基础控件使用.html">
            
                    
                    基础控件使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="../android基础/android零散知识.html">
            
                <a href="../android基础/android零散知识.html">
            
                    
                    Android零散知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.3" data-path="../android基础/android坐标体系.html">
            
                <a href="../android基础/android坐标体系.html">
            
                    
                    Android坐标体系
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.4" data-path="../android基础/APP的启动流程.html">
            
                <a href="../android基础/APP的启动流程.html">
            
                    
                    APP启动流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.5" data-path="../android基础/View加载流程.html">
            
                <a href="../android基础/View加载流程.html">
            
                    
                    View加载流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.6" data-path="../android基础/事件分发机制.html">
            
                <a href="../android基础/事件分发机制.html">
            
                    
                    事件分发机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.7" data-path="../android基础/控件绘制流程.html">
            
                <a href="../android基础/控件绘制流程.html">
            
                    
                    控件绘制流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.8" data-path="../android基础/常用shape.html">
            
                <a href="../android基础/常用shape.html">
            
                    
                    常用shape
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.9" data-path="../android基础/进程通信.html">
            
                <a href="../android基础/进程通信.html">
            
                    
                    进程通信
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.10" data-path="../通信方式/通信方式详解.html">
            
                <a href="../通信方式/通信方式详解.html">
            
                    
                    通信方式详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.11" data-path="../android基础/Binder详解.html">
            
                <a href="../android基础/Binder详解.html">
            
                    
                    Binder详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.12" data-path="../android基础/Handler详解.html">
            
                <a href="../android基础/Handler详解.html">
            
                    
                    Handle详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.13" data-path="../android基础/Fragment详解.html">
            
                <a href="../android基础/Fragment详解.html">
            
                    
                    Fragment详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.14" data-path="../android基础/Activity详解.html">
            
                <a href="../android基础/Activity详解.html">
            
                    
                    Activity详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.15" data-path="../android基础/BroadcastReceiver.html">
            
                <a href="../android基础/BroadcastReceiver.html">
            
                    
                    BroadcastReceiver详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.16" data-path="../android基础/Service服务.html">
            
                <a href="../android基础/Service服务.html">
            
                    
                    Service详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.17" data-path="../android基础/动画详解.html">
            
                <a href="../android基础/动画详解.html">
            
                    
                    动画详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.18" data-path="../android基础/屏幕刷新机制.html">
            
                <a href="../android基础/屏幕刷新机制.html">
            
                    
                    屏幕刷新机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.19" data-path="../android基础/屏幕适配.html">
            
                <a href="../android基础/屏幕适配.html">
            
                    
                    屏幕适配
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.20" data-path="../android基础/图片加载详解.html">
            
                <a href="../android基础/图片加载详解.html">
            
                    
                    图片加载详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.21" data-path="../android基础/WebView详解.html">
            
                <a href="../android基础/WebView详解.html">
            
                    
                    WebView详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.22" data-path="../android基础/沉浸式.html">
            
                <a href="../android基础/沉浸式.html">
            
                    
                    沉浸式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.23" data-path="../android基础/相机模块.html">
            
                <a href="../android基础/相机模块.html">
            
                    
                    相机模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.24" data-path="../android基础/地图模块.html">
            
                <a href="../android基础/地图模块.html">
            
                    
                    地图模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.25" data-path="../android基础/Androidstudio插件开发.html">
            
                <a href="../android基础/Androidstudio插件开发.html">
            
                    
                    Androidstudio插件开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.26" data-path="../android基础/Apk插件化开发.html">
            
                <a href="../android基础/Apk插件化开发.html">
            
                    
                    Apk插件化开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.27" data-path="../android基础/App组件化开发.html">
            
                <a href="../android基础/App组件化开发.html">
            
                    
                    App组件化开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.28" data-path="../android基础/sdk开发.html">
            
                <a href="../android基础/sdk开发.html">
            
                    
                    sdk开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.29" data-path="../android基础/APP优化.html">
            
                <a href="../android基础/APP优化.html">
            
                    
                    APP优化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.30" data-path="../android基础/项目参数配置.html">
            
                <a href="../android基础/项目参数配置.html">
            
                    
                    项目参数配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.31" data-path="../android基础/App发布.html">
            
                <a href="../android基础/App发布.html">
            
                    
                    App发布
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.32" data-path="../android基础/Android外挂.html">
            
                <a href="../android基础/Android外挂.html">
            
                    
                    Android外挂
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.33" data-path="../android基础/Android字节码插桩.html">
            
                <a href="../android基础/Android字节码插桩.html">
            
                    
                    Android字节码插桩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.34" data-path="../android基础/智能家居.html">
            
                <a href="../android基础/智能家居.html">
            
                    
                    智能家居
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../python/python基础.html">
            
                <a href="../python/python基础.html">
            
                    
                    python部分
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../python/python基础.html">
            
                <a href="../python/python基础.html">
            
                    
                    python基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="../python/python爬虫.html">
            
                <a href="../python/python爬虫.html">
            
                    
                    python爬虫
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../gradle/Groovy.html">
            
                <a href="../gradle/Groovy.html">
            
                    
                    Groovy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="../kotlin/kotlin部分.html">
            
                <a href="../kotlin/kotlin部分.html">
            
                    
                    kotlin部分
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="../flutter/flutter部分.html">
            
                <a href="../flutter/flutter部分.html">
            
                    
                    flutter部分
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="../native/ccpp.html">
            
                <a href="../native/ccpp.html">
            
                    
                    native部分
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.17.1" data-path="../native/Linux.html">
            
                <a href="../native/Linux.html">
            
                    
                    Linux
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.2" data-path="../native/ccpp.html">
            
                <a href="../native/ccpp.html">
            
                    
                    cCpp
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.3" data-path="../native/NDK.html">
            
                <a href="../native/NDK.html">
            
                    
                    NDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.4" data-path="../native/系统编译剪裁.html">
            
                <a href="../native/系统编译剪裁.html">
            
                    
                    系统编译剪裁
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.5" data-path="../native/音视频.html">
            
                <a href="../native/音视频.html">
            
                    
                    音视频
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.6" data-path="../native/音视频第三方库.html">
            
                <a href="../native/音视频第三方库.html">
            
                    
                    音视频第三方库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.7" data-path="../native/相关代码.html">
            
                <a href="../native/相关代码.html">
            
                    
                    相关代码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter active" data-level="1.18" data-path="服务器部分.html">
            
                <a href="服务器部分.html">
            
                    
                    服务器部分
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="../webDev/web部分.html">
            
                <a href="../webDev/web部分.html">
            
                    
                    web部分
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20" data-path="../人工智能/人工智能相关概念.html">
            
                <a href="../人工智能/人工智能相关概念.html">
            
                    
                    人工智能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.21" data-path="../面试真题/极飞.html">
            
                <a href="../面试真题/极飞.html">
            
                    
                    面试真题
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >服务器部分</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#&#x670D;&#x52A1;&#x5668;&#x90E8;&#x5206;"><b>1. </b>&#x670D;&#x52A1;&#x5668;&#x90E8;&#x5206;</a></li><ul><li><span class="title-icon "></span><a href="#tomcat"><b>1.1. </b>tomcat</a></li><ul><li><span class="title-icon "></span><a href="#tomcat-&#x914D;&#x7F6E;-https"><b>1.1.1. </b>tomcat &#x914D;&#x7F6E; https</a></li><li><span class="title-icon "></span><a href="#linux-&#x90E8;&#x7F72;-&#x591A;&#x4E2A;-tomcat"><b>1.1.2. </b>linux &#x90E8;&#x7F72; &#x591A;&#x4E2A; tomcat</a></li><li><span class="title-icon "></span><a href="#&#x6307;&#x5B9A;&#x7684;&#x670D;&#x52A1;&#x672A;&#x5B89;&#x88C5;-unable-to-open-the-service-tomcat7"><b>1.1.3. </b>&#x6307;&#x5B9A;&#x7684;&#x670D;&#x52A1;&#x672A;&#x5B89;&#x88C5; unable to open the service tomcat7</a></li><li><span class="title-icon "></span><a href="#&#x5728;myeclipse&#x4E0A;&#x70B9;&#x51FB;&#x90E8;&#x7F72;&#x6309;&#x94AE;&#x6CA1;&#x53CD;&#x5E94;"><b>1.1.4. </b>&#x5728;MyEclipse&#x4E0A;&#x70B9;&#x51FB;&#x90E8;&#x7F72;&#x6309;&#x94AE;&#x6CA1;&#x53CD;&#x5E94;</a></li></ul><li><span class="title-icon "></span><a href="#springboot"><b>1.2. </b>springBoot</a></li><ul><li><span class="title-icon "></span><a href="#springboot-&#x9879;&#x76EE;xml-&#x914D;&#x7F6E;"><b>1.2.1. </b>springBoot &#x9879;&#x76EE;xml &#x914D;&#x7F6E;</a></li></ul><li><span class="title-icon "></span><a href="#redis"><b>1.3. </b>redis</a></li><li><span class="title-icon "></span><a href="#nginx"><b>1.4. </b>nginx</a></li><ul><li><span class="title-icon "></span><a href="#&#x5B89;&#x88C5;&#x4F9D;&#x8D56;"><b>1.4.1. </b>&#x5B89;&#x88C5;&#x4F9D;&#x8D56;</a></li><li><span class="title-icon "></span><a href="#&#x5B89;&#x88C5;-nginx"><b>1.4.2. </b>&#x5B89;&#x88C5; Nginx</a></li><li><span class="title-icon "></span><a href="#nginx-&#x914D;&#x7F6E;-&#x6307;&#x5411;-tomcat"><b>1.4.3. </b>nginx &#x914D;&#x7F6E; &#x6307;&#x5411; tomcat</a></li></ul><li><span class="title-icon "></span><a href="#jenkins"><b>1.5. </b>jenkins</a></li><li><span class="title-icon "></span><a href="#mysql"><b>1.6. </b>mysql</a></li><ul><li><span class="title-icon "></span><a href="#&#x590D;&#x5236;&#x8868;&#x6570;&#x636E;&#x5230;&#x65B0;&#x8868;-sql"><b>1.6.1. </b>&#x590D;&#x5236;&#x8868;&#x6570;&#x636E;&#x5230;&#x65B0;&#x8868; sql</a></li><li><span class="title-icon "></span><a href="#&#x591A;&#x8868;&#x5408;&#x5E76;&#x53BB;&#x91CD;-sql"><b>1.6.2. </b>&#x591A;&#x8868;&#x5408;&#x5E76;&#x53BB;&#x91CD; sql</a></li><li><span class="title-icon "></span><a href="#&#x8BA9;id&#x4ECE;1&#x5F00;&#x59CB;&#x81EA;&#x52A8;&#x589E;&#x957F;-sql"><b>1.6.3. </b>&#x8BA9;id&#x4ECE;1&#x5F00;&#x59CB;&#x81EA;&#x52A8;&#x589E;&#x957F; sql</a></li><li><span class="title-icon "></span><a href="#&#x5206;&#x9875;&#x67E5;&#x8BE2;-sql"><b>1.6.4. </b>&#x5206;&#x9875;&#x67E5;&#x8BE2; sql</a></li><li><span class="title-icon "></span><a href="#&#x589E;&#x52A0;&#x8BB0;&#x5F55;"><b>1.6.5. </b>&#x589E;&#x52A0;&#x8BB0;&#x5F55;</a></li></ul></ul></ul></div><a href="#&#x670D;&#x52A1;&#x5668;&#x90E8;&#x5206;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="&#x670D;&#x52A1;&#x5668;&#x90E8;&#x5206;"><a name="&#x670D;&#x52A1;&#x5668;&#x90E8;&#x5206;" class="anchor-navigation-ex-anchor" href="#&#x670D;&#x52A1;&#x5668;&#x90E8;&#x5206;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x670D;&#x52A1;&#x5668;&#x90E8;&#x5206;</h1>
<h2 id="tomcat"><a name="tomcat" class="anchor-navigation-ex-anchor" href="#tomcat"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. tomcat</h2>
<pre><code class="lang-text">1&#x3001;&#x5916;&#x7F51;&#x8BBF;&#x95EE; tomcat&#xFF0C;&#x9700;&#x8981;&#x9632;&#x706B;&#x5899;&#x5BF9; 8080 &#x7AEF;&#x53E3;&#x653E;&#x884C;&#x3002;
2&#x3001;tomcat &#x9700;&#x8981; jdk &#x7684;&#x652F;&#x6301;&#x624D;&#x80FD;&#x542F;&#x52A8;
</code></pre>
<h3 id="tomcat-&#x914D;&#x7F6E;-https"><a name="tomcat-&#x914D;&#x7F6E;-https" class="anchor-navigation-ex-anchor" href="#tomcat-&#x914D;&#x7F6E;-https"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.1. tomcat &#x914D;&#x7F6E; https</h3>
<pre><code class="lang-text">&#x7528;&#x4E86;&#x817E;&#x8BAF;&#x4E91;&#x7684;&#x514D;&#x8D39;&#x8BC1;&#x4E66; + tomcat9  &#x3002;
https://cloud.tencent.com/document/product/400/4143
&#x6309;&#x7167;&#x63D0;&#x793A;&#x4FEE;&#x6539;&#x5C31;&#x884C;&#x4E86;&#x3002; &#x5E76;&#x6CA1;&#x6709;&#x624B;&#x52A8;&#x4FEE;&#x6539;&#x8FC7;tomcat&#x7684;8080&#x7AEF;&#x53E3;&#x4E3A;80.
&#x4E5F;&#x6CA1;&#x6709;&#x624B;&#x52A8;&#x5BF9;443&#x7AEF;&#x53E3;&#x653E;&#x884C; &#x3002;
&#x914D;&#x7F6E;&#x5B8C;&#x4E4B;&#x540E;&#x53EF;&#x4EE5;&#x68C0;&#x6D4B;&#x4E00;&#x4E0B;443&#x7AEF;&#x53E3;&#x662F;&#x5426;&#x53EF;&#x7528;&#x3002;
https://cloud.tencent.com/product/ssl
</code></pre>
<h3 id="linux-&#x90E8;&#x7F72;-&#x591A;&#x4E2A;-tomcat"><a name="linux-&#x90E8;&#x7F72;-&#x591A;&#x4E2A;-tomcat" class="anchor-navigation-ex-anchor" href="#linux-&#x90E8;&#x7F72;-&#x591A;&#x4E2A;-tomcat"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.2. linux &#x90E8;&#x7F72; &#x591A;&#x4E2A; tomcat</h3>
<pre><code class="lang-text">&#x4FEE;&#x6539;server.xml&#x914D;&#x7F6E;&#x6587;&#x4EF6;, &#x4E09;&#x4E2A;&#x5730;&#x65B9;

1 &#x3001;port=&quot;18005&quot;    port=&quot;18006&quot;  
&lt;Server port=&quot;8005&quot; shutdown=&quot;SHUTDOWN&quot;&gt;  

2&#x3001;port=&quot;18080&quot;    port=&quot;18081&quot;  
&lt;Connector port=&quot;8080&quot; protocol=&quot;HTTP/1.1&quot;   
               connectionTimeout=&quot;20000&quot;   
               redirectPort=&quot;8443&quot; /&gt;  

3&#x3001;port=&quot;18009&quot;    port=&quot;18008&quot;  
&lt;Connector port=&quot;8009&quot; protocol=&quot;AJP/1.3&quot; redirectPort=&quot;8443&quot; /&gt;
</code></pre>
<h3 id="&#x6307;&#x5B9A;&#x7684;&#x670D;&#x52A1;&#x672A;&#x5B89;&#x88C5;-unable-to-open-the-service-tomcat7"><a name="&#x6307;&#x5B9A;&#x7684;&#x670D;&#x52A1;&#x672A;&#x5B89;&#x88C5;-unable-to-open-the-service-tomcat7" class="anchor-navigation-ex-anchor" href="#&#x6307;&#x5B9A;&#x7684;&#x670D;&#x52A1;&#x672A;&#x5B89;&#x88C5;-unable-to-open-the-service-tomcat7"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.3. &#x6307;&#x5B9A;&#x7684;&#x670D;&#x52A1;&#x672A;&#x5B89;&#x88C5; unable to open the service tomcat7</h3>
<p>&#x8FDB;&#x5165;Tomcat&#x5B89;&#x88C5;&#x76EE;&#x5F55;&#x4E0B;&#x7684;bin&#x76EE;&#x5F55; &#x8F93;&#x5165; service.bat install &#x5373;&#x53EF;</p>
<h3 id="&#x5728;myeclipse&#x4E0A;&#x70B9;&#x51FB;&#x90E8;&#x7F72;&#x6309;&#x94AE;&#x6CA1;&#x53CD;&#x5E94;"><a name="&#x5728;myeclipse&#x4E0A;&#x70B9;&#x51FB;&#x90E8;&#x7F72;&#x6309;&#x94AE;&#x6CA1;&#x53CD;&#x5E94;" class="anchor-navigation-ex-anchor" href="#&#x5728;myeclipse&#x4E0A;&#x70B9;&#x51FB;&#x90E8;&#x7F72;&#x6309;&#x94AE;&#x6CA1;&#x53CD;&#x5E94;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.4. &#x5728;MyEclipse&#x4E0A;&#x70B9;&#x51FB;&#x90E8;&#x7F72;&#x6309;&#x94AE;&#x6CA1;&#x53CD;&#x5E94;</h3>
<pre><code class="lang-text">&#x627E;&#x5230;MyEclipse&#x7684;&#x5DE5;&#x4F5C;&#x8DEF;&#x5F84;&#xFF0C;&#x53BB;&#x201C;\.metadata\.plugins\org.eclipse.core.runtime\.settings&#x201D;
&#x627E;&#x4E00;&#x4E2A;&#x542B;&#x6709;deploy&#x7684;.prefs&#x6587;&#x4EF6;&#x3002;
&#x5220;&#x9664;&#x5373;&#x53EF; (com.genuitec.eclipse.ast.deploy.core.prefs)&#x3002;
&#x91CD;&#x65B0;&#x542F;&#x52A8;MyEclipse&#x3002;
</code></pre>
<h2 id="springboot"><a name="springboot" class="anchor-navigation-ex-anchor" href="#springboot"><i class="fa fa-link" aria-hidden="true"></i></a>1.2. springBoot</h2>
<p>&#x53EF;&#x4EE5;&#x7528; springBoot &#x5FEB;&#x901F;&#x642D;&#x5EFA;&#x4E00;&#x4E2A;&#x670D;&#x52A1;api &#x3002; 
&#x76F4;&#x63A5;&#x4F7F;&#x7528; IntelliJ &#x7684; spring Initializr &#x5F15;&#x5BFC;&#x65B0;&#x5EFA;&#x9879;&#x76EE;&#x3002;</p>
<pre><code class="lang-text">1&#x3001;IntelliJ IDEA
2&#x3001;Tomcat  
3&#x3001;springBoot
4&#x3001;mysql
5&#x3001;mybatis

// &#x9879;&#x76EE;&#x53D1;&#x5E03;war &#x672C;&#x5730;&#x8C03;&#x8BD5;jar
https://blog.csdn.net/mimica247706624/article/details/60765730
&#x56E0;&#x4E3A;&#x6211;&#x5916;&#x7F51;&#x7684;tomcat&#x914D;&#x7F6E;&#x4E86;https&#xFF0C;&#x800C;&#x4E14;&#x9879;&#x76EE;&#x4E0D;&#x5927;&#xFF0C;&#x6240;&#x4EE5;&#x6240;&#x6709;&#x7684;&#x9879;&#x76EE;&#x90E8;&#x7F72;&#x5728;&#x540C;&#x4E00;&#x4E2A;tomcat&#x4E2D;&#x3002;
&#x4F46;&#x662F;&#x672C;&#x5730;&#x4ECD;&#x7136;&#x7528;&#x5185;&#x7F6E;&#x7684;tomcat&#x8FDB;&#x884C;&#x8FD0;&#x884C;&#x8C03;&#x8BD5;&#x3002;

// &#x96C6;&#x6210;mybatis
https://blog.csdn.net/gebitan505/article/details/54929287
</code></pre>
<h3 id="springboot-&#x9879;&#x76EE;xml-&#x914D;&#x7F6E;"><a name="springboot-&#x9879;&#x76EE;xml-&#x914D;&#x7F6E;" class="anchor-navigation-ex-anchor" href="#springboot-&#x9879;&#x76EE;xml-&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2.1. springBoot &#x9879;&#x76EE;xml &#x914D;&#x7F6E;</h3>
<p>&#x66F4;&#x52A0;&#x8BE6;&#x7EC6;&#x7684;&#x914D;&#x7F6E;&#x53EF;&#x4EE5;&#x53C2;&#x8003;&#x6258;&#x7BA1;&#x5728;&#x7801;&#x4E91;&#x4E0A;&#x7684;&#x9879;&#x76EE;</p>
<pre><code class="lang-text">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.aivin&lt;/groupId&gt;
    &lt;artifactId&gt;AivinInfo&lt;/artifactId&gt;
    &lt;version&gt;1.0.0&lt;/version&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;name&gt;AivinInfo&lt;/name&gt;
    &lt;description&gt;AivinInfo project for Spring Boot&lt;/description&gt;
    &lt;parent&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
        &lt;version&gt;2.0.2.RELEASE&lt;/version&gt;
        &lt;relativePath/&gt;
    &lt;/parent&gt;
    &lt;properties&gt;
        &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
        &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
        &lt;java.version&gt;1.8&lt;/java.version&gt;
    &lt;/properties&gt;
    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.mybatis.spring.boot&lt;/groupId&gt;
            &lt;artifactId&gt;mybatis-spring-boot-starter&lt;/artifactId&gt;
            &lt;version&gt;1.3.2&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;mysql&lt;/groupId&gt;
            &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
            &lt;scope&gt;runtime&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;!--&#x589E;&#x52A0;&#x4EE5;&#x4E0B;&#x7684;&#x4F9D;&#x8D56;&#x9879;&#x8986;&#x76D6;&#x9ED8;&#x8BA4;&#x7684;&#x5185;&#x5D4C;tomcat&#x914D;&#x7F6E;--&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
            &lt;!--&#x672C;&#x5730;&#x8C03;&#x8BD5;jar&#x65F6;&#x8BF7;&#x52FF;&#x5F00;&#x542F;&#xFF0C;&#x9700;&#x8981;&#x6253;war&#x4E5F;&#x65E0;&#x9700;&#x5F00;&#x542F;--&gt;
            &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
            &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;!--&#x5206;&#x9875;&#x63D2;&#x4EF6;--&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.github.pagehelper&lt;/groupId&gt;
            &lt;artifactId&gt;pagehelper&lt;/artifactId&gt;
            &lt;version&gt;4.1.0&lt;/version&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;build&gt;
        &lt;plugins&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;
&lt;/project&gt;
// &#x8BBE;&#x7F6E;&#x8BBF;&#x95EE;&#x7684;&#x7AEF;&#x53E3;
server.port=80
// mysql&#x914D;&#x7F6E;&#x4FE1;&#x606F;
spring.datasource.url=jdbc:mysql://xxxxx:3306/xxx?useUnicode=true&amp;characterEncoding=UTF-8&amp;useSSL=true
spring.datasource.username=aivin
spring.datasource.password=xxxxx
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
// &#x62E6;&#x622A;404 &#xFF0C;500&#x7B49;&#x9519;&#x8BEF;
spring.mvc.throw-exception-if-no-handler-found=true
spring.resources.add-mappings=false
</code></pre>
<h2 id="redis"><a name="redis" class="anchor-navigation-ex-anchor" href="#redis"><i class="fa fa-link" aria-hidden="true"></i></a>1.3. redis</h2>
<p>redis &#x662F;&#x4E00;&#x79CD;&#x6570;&#x636E;&#x5E93;&#x3002; &#x5C06;&#x5E38;&#x7528;&#x6570;&#x636E;&#x5B58;&#x50A8;&#x5728;&#x5185;&#x5B58;&#x4E2D;(&#x4E5F;&#x652F;&#x6301;&#x6301;&#x4E45;&#x5316;&#x5B58;&#x50A8;),&#x63D0;&#x9AD8;&#x67E5;&#x8BE2;&#x901F;&#x5EA6; &#x3002; </p>
<pre><code class="lang-text">// Linux &#x5B89;&#x88C5; redis
https://redis.io/download &#x4E0B;&#x8F7D;&#x5B89;&#x88C5;&#x5305;
tar -zxvf  xxx
cd &#x6587;&#x4EF6;&#x5939;
make
make install

cd src
redis-server   // &#x7528;&#x9ED8;&#x8BA4;&#x914D;&#x7F6E;&#x542F;&#x52A8;redis
redis-server   ./xxxx  // &#x7528;&#x6307;&#x5B9A;&#x7684;&#x914D;&#x7F6E;&#x542F;&#x52A8;redis

&#x9A8C;&#x8BC1;&#x662F;&#x5426;&#x542F;&#x52A8;&#x6210;&#x529F;
&#x7528;&#x53E6;&#x4E00;&#x4E2A;&#x7EC8;&#x7AEF;&#x8F93;&#x5165;
redis-cli   &#xFF0C;&#x5982;&#x679C;&#x6210;&#x529F;&#x8FDB;&#x5165;redis&#x5BA2;&#x6237;&#x7AEF; &#xFF0C;&#x5C31;&#x8BF4;&#x660E;&#x542F;&#x52A8;&#x6B63;&#x5E38;
</code></pre>
<h2 id="nginx"><a name="nginx" class="anchor-navigation-ex-anchor" href="#nginx"><i class="fa fa-link" aria-hidden="true"></i></a>1.4. nginx</h2>
<p>nginx &#x7684;&#x4E3B;&#x8981;&#x4F5C;&#x7528;&#x662F;&#x53CD;&#x5411;&#x4EE3;&#x7406; &#x548C;&#x8D1F;&#x8F7D;&#x5747;&#x8861; &#x3002;</p>
<pre><code class="lang-text">ubuntu &#x4E0B;&#x53EF;&#x4EE5;&#x7528; apt-get &#x7684;&#x65B9;&#x5F0F;&#x8FDB;&#x884C;&#x5B89;&#x88C5;&#x3002;
&#x4E5F;&#x53EF;&#x4EE5;&#x53BB;&#x5B98;&#x7F51;&#x4E0B;&#x8F7D;&#x81EA;&#x5DF1;&#x60F3;&#x8981;&#x7248;&#x672C;&#x7684;&#x6E90;&#x7801;&#xFF0C;&#x81EA;&#x5DF1;&#x7F16;&#x8BD1;&#x5B89;&#x88C5;&#x3002;
&#x5728;linux&#x4E0A;&#x9700;&#x8981;&#x5B89;&#x88C5;&#x4E00;&#x4E9B;&#x4F9D;&#x8D56;&#x5E93;&#x624D;&#x80FD;&#x6B63;&#x786E;&#x5B89;&#x88C5;nginx&#x3002;
</code></pre>
<h3 id="&#x5B89;&#x88C5;&#x4F9D;&#x8D56;"><a name="&#x5B89;&#x88C5;&#x4F9D;&#x8D56;" class="anchor-navigation-ex-anchor" href="#&#x5B89;&#x88C5;&#x4F9D;&#x8D56;"><i class="fa fa-link" aria-hidden="true"></i></a>1.4.1. &#x5B89;&#x88C5;&#x4F9D;&#x8D56;</h3>
<pre><code class="lang-text">apt-get update
// &#x5B89;&#x88C5;gcc g++&#x7684;&#x4F9D;&#x8D56;&#x5E93;
apt-get install build-essential
apt-get install libtool
//&#x5B89;&#x88C5;pcre&#x4F9D;&#x8D56;&#x5E93;
apt-get install libpcre3 libpcre3-dev
//&#x5B89;&#x88C5;zlib&#x4F9D;&#x8D56;&#x5E93;
apt-get install zlib1g-dev
///&#x5B89;&#x88C5;SSL&#x4F9D;&#x8D56;&#x5E93;
apt-get install openssl
</code></pre>
<h3 id="&#x5B89;&#x88C5;-nginx"><a name="&#x5B89;&#x88C5;-nginx" class="anchor-navigation-ex-anchor" href="#&#x5B89;&#x88C5;-nginx"><i class="fa fa-link" aria-hidden="true"></i></a>1.4.2. &#x5B89;&#x88C5; Nginx</h3>
<pre><code class="lang-text">// &#x53BB;&#x5B98;&#x7F51;&#x627E;&#x5230;&#x6700;&#x7248;&#x672C;&#x7684;&#x4E0B;&#x8F7D;&#x94FE;&#x63A5; &#x4E0B;&#x8F7D;&#x5E76;&#x89E3;&#x538B;
wget http://nginx.org/download/nginx-xxx.tar.gz
tar -zxvf nginx-xxx.gz
//&#x8FDB;&#x5165;&#x89E3;&#x538B;&#x76EE;&#x5F55; &#x5E76;&#x914D;&#x7F6E;&#x914D;&#x7F6E;
cd nginx-xxx
./configure --prefix=/usr/local/nginx
make  //&#x7F16;&#x8BD1;
sudo make install  //&#x5B89;&#x88C5;
//&#x914D;&#x7F6E;&#x8F6F;&#x94FE;&#x63A5;
sudo ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx   
// &#x542F;&#x52A8; nginx
nginx -c /usr/local/nginx/conf/nginx.conf
(&#x6CE8;&#x610F;&#xFF1A;-c &#x6307;&#x5B9A;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x7684;&#x8DEF;&#x5F84;&#xFF0C;&#x4E0D;&#x52A0;&#x7684;&#x8BDD;&#xFF0C;nginx&#x4F1A;&#x81EA;&#x52A8;&#x52A0;&#x8F7D;&#x9ED8;&#x8BA4;&#x8DEF;&#x5F84;&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;)
nginx -s stop  //&#x505C;&#x6B62;nginx
ps -ef | grep nginx   // &#x67E5;&#x770B;nginx&#x8FDB;&#x7A0B; , &#x9A8C;&#x8BC1;nginx&#x662F;&#x5426;&#x542F;&#x52A8;&#x6210;&#x529F;&#x4E86;&#x3002;
nginx&#x7684;&#x9ED8;&#x8BA4;&#x7AEF;&#x53E3;&#x662F;80 &#xFF0C;&#x53EF;&#x4EE5;&#x7528;&#x6D4F;&#x89C8;&#x5668;&#x8BBF;&#x95EE;&#x670D;&#x52A1;&#x5668;&#x5730;&#x5740; &#xFF0C;
&#x5982;&#x679C;&#x6709;welcome&#x4FE1;&#x606F; &#x8BF4;&#x660E;&#x542F;&#x52A8;&#x6210;&#x529F;&#x3002;
</code></pre>
<h3 id="nginx-&#x914D;&#x7F6E;-&#x6307;&#x5411;-tomcat"><a name="nginx-&#x914D;&#x7F6E;-&#x6307;&#x5411;-tomcat" class="anchor-navigation-ex-anchor" href="#nginx-&#x914D;&#x7F6E;-&#x6307;&#x5411;-tomcat"><i class="fa fa-link" aria-hidden="true"></i></a>1.4.3. nginx &#x914D;&#x7F6E; &#x6307;&#x5411; tomcat</h3>
<pre><code class="lang-text">http{}&#x8282;&#x70B9;&#x4E4B;&#x95F4;&#x6DFB;&#x52A0;upstream&#x914D;&#x7F6E;&#x3002;
myServerHost &#x8FD9;&#x4E2A;&#x968F;&#x4FBF;&#x5199;&#xFF0C;&#x540E;&#x9762;&#x8981;&#x7528;&#x5230;&#x3002;
upstream myServerHost {
    server 127.0.0.1:18080;   
    server 127.0.0.1:18081;    
}

&#x7136;&#x540E;&#x5728; location &#x8282;&#x70B9;&#x4E2D;&#x914D;&#x7F6E; proxy_pass
location / {
            root   html;
            index  index.html index.htm;
            proxy_pass http://myServerHost;  
  }
&#x7136;&#x540E;&#x91CD;&#x542F; nginx &#x5373;&#x53EF;&#x3002;
</code></pre>
<h2 id="jenkins"><a name="jenkins" class="anchor-navigation-ex-anchor" href="#jenkins"><i class="fa fa-link" aria-hidden="true"></i></a>1.5. jenkins</h2>
<p><a href="https://jenkins.io/index.html" target="_blank">jenkins&#x5B98;&#x7F51;</a> 
<a href="https://jenkins.io/index.html" target="_blank">https://jenkins.io/index.html</a></p>
<pre><code class="lang-text">//&#x542F;&#x52A8;&#x65F6;&#x6307;&#x5B9A;&#x7AEF;&#x53E3;
java -jar jenkins.war --httpPort=8082   
//&#x505C;&#x6B62;jenkins
net stop jenkins

&#x6301;&#x7EED;&#x96C6;&#x6210;&#xFF08;Continuous integration&#xFF0C;CI&#xFF09;
&#x6307;&#x7684;&#x662F;&#x9891;&#x7E41;&#x5730;&#xFF08;&#x4E00;&#x5929;&#x591A;&#x6B21;&#xFF09;&#x5C06;&#x4EE3;&#x7801;&#x96C6;&#x6210;&#x5230;&#x4E3B;&#x5E72;&#x3002;
&#x5B83;&#x7684;&#x597D;&#x5904;&#x4E3B;&#x8981;&#x6709;&#x4E24;
1&#x3001;&#x5FEB;&#x901F;&#x53D1;&#x73B0;&#x9519;&#x8BEF;&#x3002;
&#x6BCF;&#x5B8C;&#x6210;&#x4E00;&#x70B9;&#x66F4;&#x65B0;&#xFF0C;&#x5C31;&#x96C6;&#x6210;&#x5230;&#x4E3B;&#x5E72;&#xFF0C;&#x53EF;&#x4EE5;&#x5FEB;&#x901F;&#x53D1;&#x73B0;&#x9519;&#x8BEF;&#xFF0C;&#x5B9A;&#x4F4D;&#x9519;&#x8BEF;&#x4E5F;&#x6BD4;&#x8F83;&#x5BB9;&#x6613;&#x3002;
&quot;&#x6301;&#x7EED;&#x96C6;&#x6210;&#x5E76;&#x4E0D;&#x80FD;&#x6D88;&#x9664;Bug&#xFF0C;&#x800C;&#x662F;&#x8BA9;&#x5B83;&#x4EEC;&#x975E;&#x5E38;&#x5BB9;&#x6613;&#x53D1;&#x73B0;&#x548C;&#x6539;&#x6B63;&#x3002;&quot;
2&#x3001;&#x9632;&#x6B62;&#x5206;&#x652F;&#x5927;&#x5E45;&#x504F;&#x79BB;&#x4E3B;&#x5E72;&#x3002;
&#x5982;&#x679C;&#x4E0D;&#x662F;&#x7ECF;&#x5E38;&#x96C6;&#x6210;&#xFF0C;&#x4E3B;&#x5E72;&#x53C8;&#x5728;&#x4E0D;&#x65AD;&#x66F4;&#x65B0;&#xFF0C;&#x4F1A;&#x5BFC;&#x81F4;&#x4EE5;&#x540E;&#x96C6;&#x6210;&#x7684;&#x96BE;&#x5EA6;&#x53D8;&#x5927;&#xFF0C;&#x751A;&#x81F3;&#x96BE;&#x4EE5;&#x96C6;&#x6210;&#x3002;

&#x6301;&#x7EED;&#x4EA4;&#x4ED8;&#xFF08;Continuous delivery&#xFF09;
&#x53EF;&#x4EE5;&#x770B;&#x4F5C;&#x6301;&#x7EED;&#x96C6;&#x6210;&#x7684;&#x4E0B;&#x4E00;&#x6B65;&#x3002; &#x4E0D;&#x7BA1;&#x600E;&#x4E48;&#x66F4;&#x65B0;&#xFF0C;&#x8F6F;&#x4EF6;&#x662F;&#x968F;&#x65F6;&#x968F;&#x5730;&#x53EF;&#x4EE5;&#x4EA4;&#x4ED8;&#x7684;&#x3002;
&#x6301;&#x7EED;&#x90E8;&#x7F72;&#x7684;&#x76EE;&#x6807;&#x662F;&#xFF0C;&#x4EE3;&#x7801;&#x5728;&#x4EFB;&#x4F55;&#x65F6;&#x523B;&#x90FD;&#x662F;&#x53EF;&#x90E8;&#x7F72;&#x7684;&#xFF0C;&#x53EF;&#x4EE5;&#x8FDB;&#x5165;&#x751F;&#x4EA7;&#x9636;&#x6BB5;&#x3002;
</code></pre>
<h2 id="mysql"><a name="mysql" class="anchor-navigation-ex-anchor" href="#mysql"><i class="fa fa-link" aria-hidden="true"></i></a>1.6. mysql</h2>
<h3 id="&#x590D;&#x5236;&#x8868;&#x6570;&#x636E;&#x5230;&#x65B0;&#x8868;-sql"><a name="&#x590D;&#x5236;&#x8868;&#x6570;&#x636E;&#x5230;&#x65B0;&#x8868;-sql" class="anchor-navigation-ex-anchor" href="#&#x590D;&#x5236;&#x8868;&#x6570;&#x636E;&#x5230;&#x65B0;&#x8868;-sql"><i class="fa fa-link" aria-hidden="true"></i></a>1.6.1. &#x590D;&#x5236;&#x8868;&#x6570;&#x636E;&#x5230;&#x65B0;&#x8868; sql</h3>
<pre><code class="lang-text">INSERT INTO &#x65B0;&#x8868;(&#x5B57;&#x6BB5;1,&#x5B57;&#x6BB5;2,&#x2026;&#x2026;.) 
SELECT &#x5B57;&#x6BB5;1,&#x5B57;&#x6BB5;2,&#x2026;&#x2026; FROM &#x65E7;&#x8868;

CREATE TABLE &#x65B0;&#x8868;  LIKE &#x65E7;&#x8868; INSERT INTO 
recommendpicvdebug SELECT * FROM recommendpicv3
</code></pre>
<h3 id="&#x591A;&#x8868;&#x5408;&#x5E76;&#x53BB;&#x91CD;-sql"><a name="&#x591A;&#x8868;&#x5408;&#x5E76;&#x53BB;&#x91CD;-sql" class="anchor-navigation-ex-anchor" href="#&#x591A;&#x8868;&#x5408;&#x5E76;&#x53BB;&#x91CD;-sql"><i class="fa fa-link" aria-hidden="true"></i></a>1.6.2. &#x591A;&#x8868;&#x5408;&#x5E76;&#x53BB;&#x91CD; sql</h3>
<p>InnoDB &#x548C; MyISAM&#x3002;&#x9009;&#x62E9;&#x4E3A;MyISAM&#x3002;</p>
<pre><code class="lang-text">INSERT INTO userall
SELECT t.uid, t.userName
FROM starbeaninfo4 t
WHERE t.uid NOT IN (
    SELECT uid
    FROM userall
)
</code></pre>
<h3 id="&#x8BA9;id&#x4ECE;1&#x5F00;&#x59CB;&#x81EA;&#x52A8;&#x589E;&#x957F;-sql"><a name="&#x8BA9;id&#x4ECE;1&#x5F00;&#x59CB;&#x81EA;&#x52A8;&#x589E;&#x957F;-sql" class="anchor-navigation-ex-anchor" href="#&#x8BA9;id&#x4ECE;1&#x5F00;&#x59CB;&#x81EA;&#x52A8;&#x589E;&#x957F;-sql"><i class="fa fa-link" aria-hidden="true"></i></a>1.6.3. &#x8BA9;id&#x4ECE;1&#x5F00;&#x59CB;&#x81EA;&#x52A8;&#x589E;&#x957F; sql</h3>
<pre><code class="lang-text">truncate table test
</code></pre>
<h3 id="&#x5206;&#x9875;&#x67E5;&#x8BE2;-sql"><a name="&#x5206;&#x9875;&#x67E5;&#x8BE2;-sql" class="anchor-navigation-ex-anchor" href="#&#x5206;&#x9875;&#x67E5;&#x8BE2;-sql"><i class="fa fa-link" aria-hidden="true"></i></a>1.6.4. &#x5206;&#x9875;&#x67E5;&#x8BE2; sql</h3>
<pre><code class="lang-text">SELECT *
FROM newsentity_table
WHERE (usertype = &apos;base&apos;
        OR usertype = &apos;salse&apos;)
    AND logindate IS NOT NULL
ORDER BY logindate DESC
LIMIT &#x8D77;&#x59CB;&#x884C;, &#x6BCF;&#x9875;&#x591A;&#x5C11;&#x884C;
</code></pre>
<h3 id="&#x589E;&#x52A0;&#x8BB0;&#x5F55;"><a name="&#x589E;&#x52A0;&#x8BB0;&#x5F55;" class="anchor-navigation-ex-anchor" href="#&#x589E;&#x52A0;&#x8BB0;&#x5F55;"><i class="fa fa-link" aria-hidden="true"></i></a>1.6.5. &#x589E;&#x52A0;&#x8BB0;&#x5F55;</h3>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">DBUtil</span></span>{
  <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">closeConection</span><span class="hljs-params">(Connection conn, ResultSet rs, PreparedStatement pstm)</span>
    <span class="hljs-keyword">throws</span> SQLException</span>{
    <span class="hljs-keyword">if</span> (rs != <span class="hljs-keyword">null</span>) {
      rs.close();
    }
    <span class="hljs-keyword">if</span> (pstm != <span class="hljs-keyword">null</span>) {
      pstm.close();
    }

    <span class="hljs-keyword">if</span> ((conn != <span class="hljs-keyword">null</span>) &amp;&amp; (!conn.isClosed()))
      <span class="hljs-keyword">try</span> {
        conn.close();
      } <span class="hljs-keyword">catch</span> (Exception e) {
        e.printStackTrace();
      }
  }

  <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> Connection <span class="hljs-title">getConnection</span><span class="hljs-params">()</span> </span>{
    Connection conn = <span class="hljs-keyword">null</span>;
    String URL = <span class="hljs-string">&quot;jdbc:mysql://114.67.234.65:3306/aivininfo?useUnicode=true&amp;characterEncoding=UTF-8&amp;useSSL=true&quot;</span>;
    <span class="hljs-keyword">try</span>{
      Class.forName(<span class="hljs-string">&quot;org.gjt.mm.mysql.Driver&quot;</span>);
      conn = DriverManager.getConnection(URL, <span class="hljs-string">&quot;aivin&quot;</span>,  <span class="hljs-string">&quot;Hnyer88888888&quot;</span>);
    }
    <span class="hljs-keyword">catch</span> (Exception e) {
      e.printStackTrace();
    }
    <span class="hljs-keyword">return</span> conn;
  }
}

<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyDbHelper</span> </span>{
    Connection conn;
    PreparedStatement pstm = <span class="hljs-keyword">null</span>;
    ResultSet rs = <span class="hljs-keyword">null</span>;
    String sqlStr;

    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">int</span> <span class="hljs-title">addRecommendPicRecord</span><span class="hljs-params">(String title, String content)</span> </span>{
        <span class="hljs-keyword">boolean</span> addUserSuccess = <span class="hljs-keyword">true</span>;
        <span class="hljs-keyword">long</span> addedRecodeId = -<span class="hljs-number">1L</span>;
        <span class="hljs-keyword">this</span>.conn = DBUtil.getConnection();
        <span class="hljs-keyword">this</span>.sqlStr = <span class="hljs-string">&quot;insert into aivinblog  ( blogTitle , blogContent ,updateTime)  values  ( ? ,? ,?)&quot;</span>;
        <span class="hljs-keyword">try</span> {
            <span class="hljs-keyword">this</span>.pstm = <span class="hljs-keyword">this</span>.conn.prepareStatement(<span class="hljs-keyword">this</span>.sqlStr,
                    Statement.RETURN_GENERATED_KEYS);
            <span class="hljs-keyword">this</span>.pstm.setString(<span class="hljs-number">1</span>, title);
            <span class="hljs-keyword">this</span>.pstm.setString(<span class="hljs-number">2</span>, content);
            <span class="hljs-keyword">this</span>.pstm.setString(<span class="hljs-number">3</span>, getCurrentDataStr());
            addUserSuccess = <span class="hljs-keyword">this</span>.pstm.executeUpdate() &gt; <span class="hljs-number">0</span>;

            ResultSet rs = <span class="hljs-keyword">this</span>.pstm.getGeneratedKeys();
            <span class="hljs-keyword">if</span> (rs.next())
                addedRecodeId = rs.getLong(<span class="hljs-number">1</span>);
        } <span class="hljs-keyword">catch</span> (SQLException e) {
            e.printStackTrace();
        } <span class="hljs-keyword">finally</span> {
        }
        <span class="hljs-keyword">try</span> {
            DBUtil.closeConection(<span class="hljs-keyword">this</span>.conn, <span class="hljs-keyword">this</span>.rs, <span class="hljs-keyword">this</span>.pstm);
        } <span class="hljs-keyword">catch</span> (SQLException e) {
            e.printStackTrace();
        }
        <span class="hljs-keyword">return</span> (<span class="hljs-keyword">int</span>) addedRecodeId;
    }

    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getCurrentDataStr</span><span class="hljs-params">()</span> </span>{
        DateFormat dateFormat = <span class="hljs-keyword">new</span> SimpleDateFormat(<span class="hljs-string">&quot;yyyy-MM-dd&quot;</span>,
                Locale.getDefault());
        String reslut = dateFormat.format(<span class="hljs-keyword">new</span> Date());
        <span class="hljs-keyword">return</span> reslut;
    }<span class="hljs-comment">//</span>
}
</code></pre>
<footer class="page-footer"><span class="copyright">( no Copyright&#xFF0C;enjoy youself ! ) all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">The file was updated at :
2022-04-04 10:49:02
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../native/相关代码.html" class="navigation navigation-prev " aria-label="Previous page: 相关代码">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../webDev/web部分.html" class="navigation navigation-next " aria-label="Next page: web部分">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"服务器部分","level":"1.18","depth":1,"next":{"title":"web部分","level":"1.19","depth":1,"path":"chinese/webDev/web部分.md","ref":"chinese/webDev/web部分.md","articles":[]},"previous":{"title":"相关代码","level":"1.17.7","depth":2,"path":"chinese/native/相关代码.md","ref":"chinese/native/相关代码.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-search","search-plus","todo","anchor-navigation-ex","copy-code-button","fontsettings","tbfed-pagefooter","local-video","splitter","expandable-chapters","favicon","theme-comscore","local-video"],"styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"( no Copyright，enjoy youself ! )","modify_label":"The file was updated at :","modify_format":"YYYY-MM-DD HH:mm:ss"},"todo":{},"splitter":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"family":"sans","size":2,"theme":"white"},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"favicon":{"shortcut":"assets/images/favicon.ico","bookmark":"assets/images/favicon.ico"},"theme-comscore":{},"local-video":{},"copy-code-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"Aivin","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Aivin开发笔记","language":"zh-hans","gitbook":"*","description":"Aivin开发笔记"},"file":{"path":"chinese/server/服务器部分.md","mtime":"2022-04-04T02:49:02.897Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-04-04T03:47:09.782Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-local-video/video.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

